﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BLL;

public partial class bgData_Zbmsg : System.Web.UI.Page
{
    string dlType = "";
    string xlType = "";
    string strApp = "";
    public string bmp = "";

    DBbase vCrm = new DBbase();
    BLLData bd = new BLLData();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["dlType"].ToString() == "fdj")
        {
            //发电机 fdj
            dlType = "fdj";
            bmp = "fdjlr.bmp";
        }
        else if (Request.QueryString["dlType"].ToString() == "xl")
        {
            //线路 xl
            dlType = "xl";
            bmp = "xldllr.bmp";
        }
        else if (Request.QueryString["dlType"].ToString() == "qbb")
        {
            //启备变 qbb
            dlType = "qbb";
            bmp = "glwh.bmp";
        }
        else if (Request.QueryString["dlType"].ToString() == "bsq")
        {
            //变送器 bsq
            dlType = "bsq";
            bmp = "bsqdllr.bmp";
        }
        else if (Request.QueryString["dlType"].ToString() == "fj")
        {
            //辅机 fj 
            dlType = "fj";
            bmp = "fjdllr.bmp";
        }
        else if (Request.QueryString["dlType"].ToString() == "zb")
        {
            //主变 zb
            dlType = "zb";
            bmp = "zbdllr.bmp";
        }
        else if (Request.QueryString["dlType"].ToString() == "fsc")
        { // fsc
            bmp = "fscydl.bmp";
        }

        if (!IsPostBack)
        {
            vCrm.BandObjHTML(tt, "select * from 电量线路表 where 类别ID='" + dlType + "' order by ID_key", "线路名称", "线路ID");

            DateTime dt = System.DateTime.Now;

            this.Date1.Value = dt.AddDays(-1).ToString("yyyy-MM-dd");

            xlType = this.tt.Value;

            this.show.InnerHtml = bd.RetArrsDLDescInfo(dlType, xlType);
        }
    }

    protected void btnChaXun_Click(object sender, EventArgs e)
    {
        xlType = this.tt.Value;

        this.show.InnerHtml = bd.RetArrsDLDescInfo(dlType, xlType);
    }
}
